package com.bdqn.controller;

import com.bdqn.pojo.HisCareHistory;
import com.bdqn.service.HisCareHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/hisCareHistory")
public class HisCareHistoryController {
    @Autowired
    HisCareHistoryService hisCareHistoryService;
    @PostMapping("/addHisCareHistory")
    public int addHisCareHistory(@RequestBody HisCareHistory hisCareHistory){
        int row = hisCareHistoryService.addHisCareHistory(hisCareHistory);
        return row;
    }

    @GetMapping("getChId")
    public String getChId(String id){
        String chId = hisCareHistoryService.getChId(id);
        return chId;
    }
}
